home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 2 / Gold Medal Software Volume 2 (Gold Medal) (1994).iso / tutor / dosimp2d.arj / SIMPLYD1.HYP < prev    next >
Text File  |  1993-12-09  |  67KB  |  1,021 lines

  1.                  |Tby Kari M. Jackson and Sansaska Systems|T
  2.  
  3.                     DDDDDD         OOOO        SSSS
  4.                     DD    DD     OO    OO    SS    SS
  5.                     DD     DD   OO      OO  SS
  6.                     DD      DD  OO      OO   SS
  7.                     DD      DD  OO      OO     SSS
  8.                     DD      DD  OO      OO        SS
  9.                     DD     DD   OO      OO         SS
  10.                     DD    DD     OO    OO   SS    SS
  11.                     DDDDDD         OOOO       SSSS
  12.                     |T(Disk)     (Operating)   (System)|T
  13.  
  14.                                Simply Said,
  15.  
  16.                                Simply Done,
  17.  
  18.  Demonstration                 SIMPLY EASY!
  19.   Version 2.0                                              (c)1991-1993
  20.                         |T<page down> for Main Menu|T
  21.                                 Main Menu
  22. -=|sInstructions|s=-                                         -=|sWhat Is DOS?|s=-
  23.                                DOS Commands
  24.  
  25.     φ |nAPPEND|n      COMMENT      » |nDIR|n          |nEXIT|n         GWBASIC
  26.     φ ASSIGN      COMP           DISKCOMP     EXPAND       HELP
  27.       ATTRIB      COPY           DISKCOPY   * FASTHELP     IF
  28.     » |nBACKUP|n      COUNTRY        DO|1S        φ |nFASTOPEN|n   * INCLUDE
  29.     φ |nBREAK|n     φ CTTY         » |nDOSKEY|n       FC           INSTALL
  30.       |nBUFFERS|n     DATE           |nDOSSHELL|n     FCBS       * INSTALLHIGH
  31.       CALL      * DBLSPACE       DOSSWAP    φ FDISK      * INTERLNK
  32.       CD        φ DEBUG          DRIVPARM     FILES      * INTERSVR
  33.       CHCP      * |nDEFRAG|n         ECHO         FIND       φ JOIN
  34.       CHDIR       DEL            EDIT         FOR          KEYB
  35.     » |nCHKDSK|n      DELOLDOS       EDLIN      φ FORMAT       LABEL
  36.     * CHOICE    * DELTREE        EMM386       GOTO         |nLASTDRIVE|n
  37.       CLS         DEVICE         ERASE        GRAFTABL     LH
  38.       COMMAND     DEVICEHIGH     EXE2BIN      |nGRAPHICS|n     LOADFIX
  39.  
  40.                 <page down> for more commands and subjects
  41.  
  42.         LOADHIGH           MSHERC          REN             STACKS
  43.         MD               * MWAV            RENAME        * SUBMENU
  44.         |nMEM|n              * MWAVTSR         REPLACE       φ SUBST
  45.       * |nMEMMAKER|n         * MWBACKUP        |nRESTORE|n         SWITCHAR
  46.       * MENUCOLOR        * MWUNDEL         RMDIR           SWITCHES
  47.       * MENUDEFAULT        NLSFUNC         SELECT          SYS
  48.       * MENUITEM         * NUMLOCK         SET             |nTIME|n
  49.       » |nMIRROR|n           » |nPATH|n            SETVER          TREE
  50.         MKDIR              PAUSE           |nSHARE|n           TRUENAME
  51.         |nMODE|n             * POWER         » SHELL         » TYPE
  52.       » MORE               |nPRINT|n           SHIFT           UNDELETE
  53.       * |nMOUSE|n              |nPROMPT|n        * SIZER         φ UNFORMAT
  54.       * MOVE               QBASIC        * SMARTDRV        VER
  55.       * MSAV               RD            * SMARTMON      » |nVERIFY|n
  56.       * MSBACKUP         φ RECOVER         SORT            VOL
  57.       * MSCDEX             REM           * SPATCH        * VSAFE
  58.       * |nMSD|n                                              » XCOPY
  59.  
  60.                       <page down> for more subjects
  61.  
  62.    φ ". and .."                        BBS               » COMSPEC
  63.    » *.*                               BIOS                CON
  64.      |n286|n                               |nBoot|n              φ Concatenation
  65.      |n386|n                             » |nBoot|n Disk         * CONFIG
  66.      |n8088|n                              Bytes             » |nCONFIG.SYS|n
  67.      A:                                C:                  Conventional
  68.      Abort, Retry, Fail, Ignore        |nCache|n               COUNTRY.SYS
  69.      Access Denied                     Checksum            |nCPU|n
  70.      ANSI.SYS                        * CHKLIST.MS          Current
  71.      Archive                         * CHKSTATE.SYS        |nDefault|n
  72.      ASCII                             CLOCK$              Demo
  73.    » Attributes                        Cluster             |nDevice Driver|n
  74.    » |nAUTOEXEC.BAT|n                    » CMOS                Devices
  75.      AUX                               Code Page           DIRCMD
  76.    » Bad Command or Filename           COM1              » Directory
  77.      Bad Sector                      » COMMAND.COM         Disk Full
  78.    » |nBatch|n                             |nCommercial|n        » Disks
  79.  
  80.                       <page down> for more subjects
  81.  
  82.   DISPLAY.SYS          Filter                         IO.SYS
  83.   DOSHELP.HLP          |nFloppy|n                         Kernel
  84. * |nDOSSHELL|n             |nFragmented|n                     |nKeyboard|n
  85.   Downloading          Freeware                       |nKEYBOARD|n.SYS
  86.   DRIVER.SYS           Handles                        LIM
  87. » Editing Keys         Hidden                         Logical Drives
  88.   EGA.SYS              Hig|1h                           LPT1
  89.   EMS                  HIMEM.SYS                      Macros
  90. » Environment          HMA                          » Memory
  91.   ERRORLEVEL           IBMBIO.COM                     MSDOS.SYS
  92. » Executable           IBMDOS.COM                     Non System Disk
  93.   EXIST                Incorrect DOS Version          NOT
  94.   Expanded             Insufficient Disk Space        NUL
  95.   Extended             Internal                       |nOptimizer|n
  96.   External             |nInterrupt|n                      Overlay
  97. » |nFAT|n                  Invalid COMMAND.COM            Packed File Corrupt
  98.   File Creation Error  Invalid Drive Specification  » |nParameters|n
  99.  
  100.                       <page down> for more subjects
  101.  
  102.        Parent                 Replaceable               |nSwitch|n
  103.        Partition              Reserved                » TEMP
  104.        Piping                 ROM                       Track 0 Bad
  105.        POST                   Root                    φ TSR
  106.        PRINTER.SYS            Sector                    UMB
  107.        PRN                    Sector Not Found          Upper
  108.        |nPublic Domain|n          Setup                     |nVDISK.SYS|n
  109.        Queue                  Shadow                    Virtual Disk
  110.        RAM                    |nShareware|n                 Volume
  111.      φ |nRAMdisk|n              φ |nShelling Out|n              Wildcards
  112.        |nRAMDRIVE.SYS|n           Slack Space             * WINPMT
  113.        |nReboot|n                 |nSMARTDRV.SYS|n            » Write-Protect
  114.      φ Redirection            |nSpooler|n                   XMS
  115.  
  116.                    -=!!=-=!!=-=!!=-=!!=-=!!=-=!!=-=!!=-
  117.                    =      -=About This Program=-      =
  118.                    !    -=DOS 6.0's New Features=-    !
  119.                    =          -=|sTrademarks|s=-          =
  120.                    -=!!=-=!!=-=!!=-=!!=-=!!=-=!!=-=!!=-
  121.                   |TInstructions|T for Navigating This Book
  122.  
  123.  
  124. In this Demonstration version, the only words that are highlighted on the
  125. menu are the ones that are defined here.  In the full version, all of the
  126. words on the menu are highlighted because they're all defined in the full
  127. version.
  128.  
  129. Other than that,  the Demonstration version works just about the same way
  130. as the full version.
  131.  
  132. To order the full version for US $29.95, call (510) 676-2268 or write to:
  133.                                 Sansaska Systems
  134.                                 Derek Gitelson
  135.                                 3311 Concord Blvd.
  136.                                 Concord, CA  94519 or look for it in your
  137. local software store or your favorite mail order catalog.
  138.  
  139.  
  140.                     <page down> for more Instructions
  141. Words on the menu  that have » next to them are very useful subjects that
  142. you should learn about as soon as possible.  Words with the φ symbol next
  143. to them  can be very dangerous,  so you should read about them before you
  144. get yourself into trouble by using them.  (Forewarned is forearmed.)  And
  145. words on the menu with * next to them are new to DOS 6.0.
  146.  
  147. Computer-related words  in the text  are highlighted.   These are  called
  148. "hotspots".   Each hotspot has a "target"  which is the part  of the text
  149. that explains that word.   If you run  into a word  in the text  that you
  150. don't understand,  all you have to do is  put your cursor on that hotspot
  151. and hit the <Enter> key  to get to the target and read about it.   If you
  152. run across  another word you don't understand,  put your cursor on it and
  153. hit <Enter> to go read about that second word.  When you're done learning
  154. about the second word,  hold down a <Ctrl> key and hit <Enter>  to return
  155. to where you left off in reading about the first word.   Hit <Ctrl-Enter>
  156. again to return to where you were  before you hit <Enter> the first time.
  157. Just jump around,  using <Enter>  to look up a word,  and <Ctrl-Enter> to
  158. return to where you were  before you did that.   This "book" is not meant
  159. to be read from "cover to cover", since its chapters are not in any logi-
  160.                     <page down> for more Instructions
  161. cal order.   The first thing  you should learn about is  |nDirectory|n Struc-
  162. ture.  So <PageUp> to the third page of the Main Menu, put your cursor on
  163. |nDirectory|n, hit <Enter>, and read about that.   Where you go from there is
  164. totally up to you.  And here are the keystrokes you use to get around:
  165.  
  166. <PageUp> and <PageDown>  Scroll through the text page by page.
  167. <Arrow>                  Select a different hotspot on the same page.
  168. <Letter>                 Move to a hotspot  that starts with that letter.
  169. <Enter>                  Move to the target of the selected hotspot.
  170. <Ctrl-Enter>             Return to where you were before you hit <Enter>.
  171. <Ctrl-Home>              Return to  the Title Page,  where you'll be just
  172.                          a <PageDown> key away from the Main Menu.
  173. <Esc>                    Exit from the book.
  174. <Ctrl-/>                 Exit from the book, and if you're using the Hyp-
  175.                          ertext reader in TSR mode, it remembers the spot
  176.                          you were in.  So if you enter the book again be-
  177.                          fore |sreboot|sing, it'll start out in that spot in-
  178.                          stead of at the Title Page.
  179.  
  180.                         <page down> for |nTrademarks|n
  181.                                 |TTrademarks|T
  182. All words used in this book  that we know to be |ntrademarks|n are listed be-
  183. low.   All other possible trademark names  are appropriately capitalized.
  184. We cannot guarantee the accuracy of this information,  but we've done our
  185. best to make it so.  Please let us know if there's anything incorrect.
  186.      American Megatrends International   AMI
  187.      Biologic                            HRAM
  188.      Central Point Software              PC Tools
  189.      Chips & Technologies                NEAT
  190.      Intel                               8088, 80|s286|s,  80|s386|s
  191.      International Business Machines     IBM, PC
  192.      Key Software Products               The Last Byte
  193.      Lotus, Intel, Microsoft             EMS, LIM
  194.         The above plus AST Research      XMS
  195.      Microsoft                           MS-DOS, Windows
  196.      Phoenix Technologies                Phoenix
  197.      Qualitas                            386Max
  198.      Quarterdeck Office Systems          Manifest, QEMM, QRAM, VIDRAM
  199.      Reidar Gresseth & Chris Hook        EXPLOSIV
  200.      TurboPower Software                 MARK, RELEASE
  201.                         |tMemory|t and Related Topics
  202.  
  203. First  of all,  |nmemory|n has  nothing to do  with disk space.   Some people
  204. might call disk space "memory" but that is misleading and very confusing.
  205. The two aren't related at all.   Disk space is where  the computer stores
  206. things that it's not using at the moment.   Like a file cabinet.   |nMemory|n
  207. is |TRAM|T (Random Access Memory)  chips that plug into the motherboard,  and
  208. this is where  the computer keeps  programs that are  actually running at
  209. the moment  and the data  those programs  are using.   Like your desktop.
  210. The size of your desk and the size of your filing cabinets are not at all
  211. related.   If you get an  "Out of memory" error,  don't be thinking  that
  212. deleting files from your hard drive is going to help that.  What you need
  213. to do  is remove  some of the |sTSR|ss  and |sdevice driver|ss that you're using.
  214. The way to do that is to edit  your CONFIG.SYS and AUTOEXEC.BAT files and
  215. remove the commands that start some TSRs and device drivers.  Then reboot
  216. your computer.  Or just reboot from a clean boo|1t disk.
  217.  
  218. Besides  whatever programs you're working on  and whatever device drivers
  219. and TSRs your CONFIG.SYS and AUTOEXEC.BAT files loaded for you,  the com-
  220.                        <page down> for more Memory
  221. puter's |nmemory|n also contains the main parts of DOS  at all times.   With-
  222. out DOS in |nmemory|n,  the computer is every bit as stupid  as your electric
  223. stapler.   No, in fact,  more stupid than that  because the stapler knows
  224. how to staple.   The computer doesn't know how to do anything  unless DOS
  225. is there telling it.   This part of DOS that stays in |nmemory|n all the time
  226. is called the DOS "|tkernel|t".  Now all the software companies know that the
  227. DOS |nkernel|n has to be in |nmemory|n,  and even a couple  of |sdevice driver|ss and
  228. |sTSR|ss too.  So when they write on the package that a certain program needs
  229. 512K or 640K in order to run, they mean you need to have that much |nmemory|n
  230. installed, not that you need to have that much available.  By the way, to
  231. find out how much you have available at any particular time,  look at the
  232. last line of  the CHKDSK command's output.   Or if you have DOS version 4
  233. or later, use the MEM command.
  234.  
  235. |nMemory|n is volatile.   That means it evaporates easily.   Ok, it's not the
  236. |nmemory|n that's volatile;  it's the stuff that's in |nmemory|n that's volatile.
  237. The second you turn off the computer,  or reboot,  or the power goes out,
  238. everything  that was in |nmemory|n is gone.   And you can't get it back.   So
  239. save your work to disk often.   For example,  as I'm writing this with my
  240.                        <page down> for more Memory
  241. word processor,  the only place my words exist  is in the computer's mem-
  242. ory.  So if my electric company hiccupped, I'd have to start this chapter
  243. all over again.   Well my word processor has this real handy F2 keystroke
  244. that means  "save to disk  under original filename".   So I hit my F2 key
  245. every couple sentences.   That writes my work  to disk where it won't get
  246. lost even if my electricity  goes out altogether.   Of course,  your word
  247. processor doesn't necessarily use  the F2 key for saving.   Find out what
  248. keystroke works  to save data to disk  in your word processor,  and do it
  249. often  while you're writing!   The same goes for your spreadsheet,  data-
  250. base, paint program, and whatever other programs you use.
  251.  
  252. |tBytes|t are units of measurement for |nmemory|n.   A byte is just basically one
  253. character of data.  "A" is a byte, "b" is a byte, "7" is a byte, "+" is a
  254. byte, etc.  A bit is one eighth of a byte, and a nybble is one half byte,
  255. but it's not too often  that you'll need to know those.   Mostly you only
  256. need to know multiples of |nbytes|n, not fractions of them.   A Kilobyte, Kb,
  257. or K is 1024 |nbytes|n.  The abbreviation Kilo usually means 1000, but compu-
  258. ters use the binary numbering system  so 1024 is what Kilo means when you
  259. talk computers.  A Megabyte, Meg, Mb, or M is 1024 Kilobytes or 1,048,576
  260.                        <page down> for more Memory
  261. bytes.  And a Gigabyte is 1024 Megabytes, or 1,073,741,824 bytes.
  262.  
  263. There are lots  of different classifications of |nmemory|n.   The most impor-
  264. tant is the lowest 640K, which is called |tConventional|t |nmemory|n.  That's the
  265. kind that DOS knows how to run programs in,  and that's right, 640K of it
  266. is all there is!   Well the designers  of the first PC thought that was a
  267. good idea at the time.   See,  back then 64K  was a perfectly respectable
  268. amount of |nmemory|n for a computer to have.   Honest,  you could run a whole
  269. lot of programs in that little bit of |nmemory|n.   (You still could,  except
  270. that programmers are writing  these big fat programs  with fancy graphics
  271. and other  memory-wasting features.)   All right,  so we started out with
  272. the IBM PC which didn't physically have  the ability to address more than
  273. one meg of different |nmemory|n locations, and the designers had to set aside
  274. some portion of that |nmemory|n space  to use for the |nmemory|n  on the graphics
  275. card, and the BIOS,  and all that.   So they decided that 384K of the one
  276. meg had to be |treserved|t for those things, and the other 640K could be used
  277. as main program |nmemory|n.   And there wasn't anything wrong with that,  be-
  278. cause remember computers back then didn't need any more than one tenth of
  279. that!
  280.                        <page down> for more Memory
  281. Well nowadays we need more than that,  but we don't get it.   Because IBM
  282. and Microsoft  are committed to  continued support  of the people who are
  283. still using those IBM PCs, XTs, and other computers that use the 8088 CPU
  284. chip which can't address  more than one meg of |nmemory|n locations.   DOS is
  285. never  going to lose the 640K barrier  as long as there are 8088 machines
  286. still being used.
  287.  
  288. So,  what do we do about that  if we want  to keep using  DOS?   Well the
  289. first workaround was  the |tExpanded|t |nMemory|n Specification,  which is called
  290. |TEMS|T for short.   This scheme was invented  so that machines with the 8088
  291. CPU could use more than  640K of |nmemory|n.   Well remember the 8088 can not
  292. talk to more than  1,048,576 different  bytes of |nmemory|n.   But that's ok,
  293. because remember that space  between the 640K  and 1024K addresses?   You
  294. know,  the part  that's reserved  for the video card,  the BIOS,  and all
  295. that?   Not all of that gets used up  by those things for which it is re-
  296. served.   Some of it is  left empty.   So they invented  |nexpanded|n |nmemory|n.
  297. There's a piece of hardware on an |nexpanded|n |nmemory|n board that knows how to
  298. dynamically remap |nmemory|n locations into different |nmemory|n addresses.  Well
  299. first it needs a certain piece of software loaded into |nmemory|n,  called an
  300.                        <page down> for more Memory
  301. Expanded |nMemory|n Manager (EMM),  that controls a certain 64K chunk of that
  302. reserved space.   This 64K chunk is called a Page Frame.  Now the EMM can
  303. use that  expanded  |nmemory|n board's  address remapping  ability  to |nswitch|n
  304. different chunks of expanded |nmemory|n in and out of that page frame.   See,
  305. DOS can access  any |nmemory|n address  below one meg.   DOS normally ignores
  306. everything above 640K because the rest is reserved, but the EMM tells DOS
  307. that it's ok to look for data in the page frame.   So the EMM keeps track
  308. of where the data is on the expanded |nmemory|n board,  and when DOS asks for
  309. a certain piece  of data,  the EMM remaps  that piece of |nmemory|n  into the
  310. page frame where DOS can see it, and then the next time DOS asks for some
  311. other piece of data  from the expanded |nmemory|n board,  the EMM puts what's
  312. in the page frame back onto the expanded |nmemory|n board  and gets the piece
  313. DOS wants  and puts it  in the page frame  instead.   It's just switching
  314. banks of |nmemory|n locations  into and out of  a small number of |nmemory|n add-
  315. resses  (so EMS is also called  "bank switching").   As you can  imagine,
  316. this goes a lot slower than normal conventional |nmemory|n access,  but it is
  317. better than not having any way at all to access more than 640K of |nmemory|n.
  318. (|sEMS|s is also called  |TLIM|T [Lotus-Intel-Microsoft] |nmemory|n,  and if you want
  319. to buy an expanded |nmemory|n board, then make real sure that it's completely
  320.                        <page down> for more Memory
  321. hardware-compatible  with version 4 of the LIM EMS specification  since a
  322. lot of programs won't be able to use it if it's not.)
  323.  
  324. But then came the 80286 processor.  This one has the ability to access 16
  325. mega|sbytes|s worth of |nmemory|n addresses.  So a new scheme had to be developed
  326. to access all those addresses!  This one was called |teXtended|t |nMemory|n Spec-
  327. ification (|TXMS|T).   (Who came up with these names,  huh?)   Now there is a
  328. problem with this.  The 286 processor can run in two modes.  One's called
  329. Real Mode and that's the only one DOS can run in.  But in real mode there
  330. is no way to access anything  above the one meg address.   The other mode
  331. is called  Protected Mode,  and in that mode  the computer can  address a
  332. virtually unlimited amount of |nmemory|n.   But DOS can't run when the compu-
  333. ter is in protected mode.   So you've got to have  a thing called  an |nXMS|n
  334. manager, which is a device driver in the same way that the EMM is.   This
  335. thing controls the processor's switching back and forth between real mode
  336. and protected mode, so that |nextended|n |nmemory|n can be accessed.
  337.  
  338. Well  you can see  that with all this  switching of |nmemory|n  locations and
  339. switching of  processor modes,  there's just about  no way that a program
  340.                        <page down> for more Memory
  341. can run in either expanded or extended |nmemory|n.  But there are quite a few
  342. types of programs  that can store and access  the data they're working on
  343. in those types  of |nmemory|n.   But these programs  have to be specially de-
  344. signed to know  how to do that.   There's no way  to get a program to use
  345. expanded  or extended |nmemory|n  for its data storage  unless it was written
  346. specifically to be able to use it.
  347.  
  348. Besides just applications like some spreadsheets and databases, there are
  349. other things  that very commonly know how  to use that additional |nmemory|n.
  350. DOS  even comes with  a couple of them.   A RAMdisk can do it.   So can a
  351. disk cache.   DOS comes with |sRAMDRIVE.SYS|s/|sVDISK.SYS|s  and SMARTDRV.SYS for
  352. those purposes.  Print spoolers can also do it, but DOS doesn't come with
  353. one of those  (except for the PRINT command  which is a spooler  that can
  354. only use conventional  memory).   Most RAMdisks,  disk caches,  and print
  355. spoolers can even use extended |nmemory|n  without your loading any XMS mana-
  356. ger!  They have their own built right in.  Isn't that convenient?
  357.  
  358. DOS versions 4 and 5 also come with |tHIMEM.SYS|t--an XMS manager, and an EMM
  359. called |TEMM386|T.  As its name implies, |nEMM386|n can only run on 386 or higher
  360.                        <page down> for more Memory
  361. computers.  You see, a 386 doesn't need an expanded |nmemory|n board in order
  362. to have expanded |nmemory|n.   The 386 processor has memory-address-remapping
  363. capabilities built right into it.   So all it needs  is the EMM (manager)
  364. in order to treat  some of its extended |nmemory|n as expanded |nmemory|n.   This
  365. is called EMS emulation.  This is not to be confused with EMS simulation.
  366. Simulation is done on 286 machines that don't have expanded |nmemory|n boards
  367. but it doesn't work nearly as well as real expanded |nmemory|n does.  The 286
  368. just doesn't have the ability  to treat extended |nmemory|n as if it were ex-
  369. panded.  An EMS simulator will try.   It puts the page frame into conven-
  370. tional |nmemory|n instead of the reserved |nmemory|n area,  and it's slow, and it
  371. can't even be used by some of the types of software that require expanded
  372. |nmemory|n.  But if your application can use it,  and if you have the conven-
  373. tional |nmemory|n  to spare to use  for the page frame,  it's better than not
  374. having expanded |nmemory|n at all, if you need expanded |nmemory|n.
  375.  
  376. So,  how do you remember the difference  between the words "expanded" and
  377. "extended"?   They're identical except for the middle syllable,  but it's
  378. not really  so difficult.   The word  expanded  conjures up  the image of
  379. something  that has gone  from being narrow  to being wide.   Well,  with
  380.                        <page down> for more Memory
  381. expanded |nmemory|n,  DOS is looking  through a  narrow page frame  at a wide
  382. chunk of |nmemory|n.   The word extended refers to something going from short
  383. to long.   And with extended |nmemory|n,  you take  the short list  of |nmemory|n
  384. addresses that the computer can access,  just one meg,  and you make it a
  385. long list of addresses,  up to sixteen megs or even more.   You could say
  386. that description of extended could also apply to expanded, but it doesn't
  387. because expanded |nmemory|n doesn't have any addresses.  (Except the 64K bank
  388. of |nmemory|n that's  currently sitting in the page frame.   It has addresses
  389. for the moment, but only until DOS wants data from one of the other banks
  390. of expanded |nmemory|n  and the EMM swaps it back out  to the unaddressed ex-
  391. panded |nmemory|n and swaps the requested bank into the page frame.)
  392.  
  393. There are a lot more programs written  to be able to access expanded mem-
  394. ory than there are of programs that can use extended.   Because it's been
  395. around longer, so programmers have already learned real well how to write
  396. for it.   And also because software companies  like to be compatible with
  397. as many kinds of computers as possible to sell as many copies as possible
  398. so they have to use expanded  instead of extended  so that their programs
  399. will run on machines that are still using the 8088 processor.   But when-
  400.                        <page down> for more Memory
  401. ever you have  a choice of which kind to use,  go with extended if at all
  402. possible because it's much more efficient!
  403.  
  404. One thing an awful lot of people don't understand is that even though ex-
  405. tended |nmemory|n can't exist at any address lower than 1024K,  that does not
  406. mean that a computer with only one meg of |nmemory|n  can't have any extended
  407. |nmemory|n.   It doesn't mean that at all!   Remember,  the addresses between
  408. 640K and 1024K are reserved  for all that BIOS  and video and stuff.   So
  409. motherboard |nmemory|n can't go there.  If you have one meg of |nmemory|n on your
  410. motherboard,  then the part above the first 640K has to go into addresses
  411. above 1024K since it can't go into the reserved area.  So one meg of mem-
  412. ory means 640K of conventional |nmemory|n  at addresses 0K-1024K  and 384K of
  413. |nmemory|n  at addresses  1024K-1408K.   That means  384K of extended |nmemory|n.
  414. The addresses between 640K and 1024K are reserved  for use by those other
  415. things.   There is  no |nmemory|n there.   |nMemory|n can only go  below the 640K
  416. address or above the 1024K address.   Just because there is 384K worth of
  417. addresses between 640K and 1024K does not mean there is |nmemory|n there, any
  418. more  than a house  that has an address  necessarily has  a family living
  419. there!  So many people, experts, and books tell other people that the top
  420.                        <page down> for more Memory
  421. 384K  of their one meg  of |nmemory|n  is reserved  and they can't use it for
  422. anything, and that is not true!   There is no reserved |nmemory|n.   Only re-
  423. served addresses.   A one meg machine has 384K of usable extended |nmemory|n.
  424.  
  425. Well those are the main types of |nmemory|n but we're not done with this les-
  426. son yet.  Not at all.  For one thing, there are exceptions to some of the
  427. rules I've given so far.   It actually is possible  to get more than 640K
  428. of conventional |nmemory|n, even up to 736K.   But only on some machines, and
  429. only if you give up your graphics capability.   Remember how there is all
  430. that unused space in the reserved |nmemory|n area?   The only reason it can't
  431. be used as conventional |nmemory|n is because it is not "contiguous", or in a
  432. row, with the conventional |nmemory|n.   The lowest addresses in the reserved
  433. |nmemory|n area  are used  by the graphics parts  of the |nmemory|n on your video
  434. card.   So that is between  the conventional |nmemory|n  and the empty parts.
  435. Since the empty parts  are separated from  the conventional |nmemory|n,  they
  436. can't be part of conventional |nmemory|n.   But check this out!  The graphics
  437. |nmemory|n is contiguous with  the conventional |nmemory|n.   If it weren't being
  438. used for graphics, it could be used for conventional memory!  Well that's
  439. just the idea behind programs such as Quarterdeck's VIDRAM.   It disables
  440.                        <page down> for more Memory
  441. the graphics  and convinces DOS to use that portion of the reserved area.
  442. Absolutely amazing.   But of course  you can't run any  graphics programs
  443. while you're using VIDRAM.   Only plain old text programs like word proc-
  444. essors.   But just imagine being able  to have over  700K of conventional
  445. memory!  You could have lots of |sTSR|ss loaded and still be able to run some
  446. really large programs.   The trouble with that is  that most of the  pro-
  447. grams that want large amounts of |nmemory|n are the programs that need to use
  448. that graphics |nmemory|n for graphics.
  449.  
  450. So, besides disabling graphics to add it to the conventional |nmemory|n,  and
  451. using 64K of it for an expanded |nmemory|n page frame,  how else can you take
  452. advantage of the fact that the reserved |nmemory|n area is not all used up by
  453. the things that are supposed to use it?  Well if you have the right hard-
  454. ware and the right software,  you can run your TSRs and |sdevice driver|ss up
  455. there which frees up  all the space  they would otherwise be  using up in
  456. your precious conventional |nmemory|n.  What's the right hardware?  A 386, or
  457. a 286 with a LIM 4.0 expanded |nmemory|n board,  or a 286 with a very special
  458. chipset such as  the Chips & Technologies  NEAT chipset or just about any
  459. one that has Shadow RAM capability.   (We'll get to Shadow RAM in a bit.)
  460.                        <page down> for more Memory
  461. All of these pieces of hardware have the ability to remap |nmemory|n from one
  462. location to another.   So they can take some expanded  or extended |nmemory|n
  463. and convince the computer that it's actually located in those unused add-
  464. resses  in the reserved |nmemory|n area.   So now you have |nmemory|n that is not
  465. in conventional addresses,  but is still in addresses  that DOS knows how
  466. to communicate with.  And you can load things into those addresses.  What
  467. is the software that you need  in order to make the computer do that add-
  468. ress remapping?   For a 286 there's Quarterdeck's QRAM, a couple of other
  469. commercial ones,  and even two shareware ones that I know of,  called The
  470. Last Byte and HRAM.   For a 386 or higher computer, there's Quarterdeck's
  471. QEMM, Qualitas's 386Max, and even DOS 5.0's EMM386.  DOS 5 didn't include
  472. one for 286s because there are so few 286s that have the memory-remapping
  473. ability, whereas all 386s have it.
  474.  
  475. By the way,  once there is some |nmemory|n remapped into those empty reserved
  476. |nmemory|n addresses, it's not called "reserved" anymore.   Now it's known as
  477. |tUpper|t |nMemory|n Blocks.   Some software companies  even call it high |nmemory|n,
  478. but I don't like to do that,  because it's too easy  to confuse that term
  479. with the HMA.  (|TUMB|T is the abbreviation for |nUpper|n |nMemory|n Blocks.)
  480.                        <page down> for more Memory
  481. What is this  "|TBIOS|T" thing that  part of the reserved |nmemory|n  is reserved
  482. for?  It stands for Basic Input/Output System.   This is the |ninstructions|n
  483. in the ROM of the computer that tell it how to communicate with the peri-
  484. pherals such as the drives, the keyboard, the comm ports, etc.  DOS talks
  485. to the |nBIOS|n real often,  because each computer is a little different from
  486. every other computer,  so DOS couldn't possibly  know how  to communicate
  487. with every type of hardware.   So the |nBIOS|n is like the translator between
  488. DOS and the hardware.   AMI and Phoenix  are both very popular  brands of
  489. |nBIOS|n, and each different motherboard design has its own version.
  490.  
  491. Well,  considering how often DOS has to access the |nBIOS|n,  and considering
  492. that it's in |TROM|T  (Read-Only  Memory)  which is non-volatile  and is very
  493. slow,  wouldn't it be nice  to have it in fast RAM  instead of slow  ROM?
  494. Well, that's what |tShadow|t RAM is all about.   Computers that can do |nShadow|n
  495. RAM copy the data from |nROM|n into some extended |nmemory|n,  and remap that ex-
  496. tended |nmemory|n into the reserved addresses  through which a computer would
  497. normally access the |nROM|n.   So now you have your |nROM|n |nBIOS|n routines in nice
  498. fast RAM instead.  The problem is, this is eating up what would otherwise
  499. be extended |nmemory|n.  Some computers only do it for the addresses that are
  500.                        <page down> for more Memory
  501. used by ROM chips,  but others disable an entire  384K of extended |nmemory|n
  502. while they're at it.  And some computers allow Shadow RAM to be disabled,
  503. so that your extended |nmemory|n  becomes extended again.   But others don't.
  504. So if you've only got one meg of RAM,  then it's possible that Shadow RAM
  505. ability is depriving you of extended |nmemory|n altogether.  Well, nothing in
  506. life is free.   You want  fast BIOS routines,  but sometimes  you have to
  507. give something up in order to get it.
  508.  
  509. Ok,  here comes another  exception to the rules.   I said that there's no
  510. way that DOS can access anything above the one meg address.   Well that's
  511. true,  DOS can't access  any block of |nmemory|n  whose starting  location is
  512. above the one meg address.   But that doesn't say anything about the end-
  513. ing location of a |nmemory|n block.  On a 286 or higher computer that has ex-
  514. tended |nmemory|n, there's a little trick of the A20 address line that allows
  515. DOS to access  a 64K chunk of |nmemory|n  that begins 16 bytes  below the one
  516. meg address.   So that means  that 65,520 bytes  of that |nmemory|n block  is
  517. above the one meg address, but DOS can access it because DOS names |nmemory|n
  518. blocks by their starting address, not their ending address.   This little
  519. 64K chunk of space is called  the |tHig|1h|t |nMemory|n Area,  which is abbreviated
  520.                        <page down> for more Memory
  521. as |tHMA|t.   It's not conventional |nmemory|n,  because it's not contiguous with
  522. the bottom 640K of |nmemory|n.   But some programs know  how to use it almost
  523. as if it were conventional memory!   This is one of the best things about
  524. DOS version 5.   It actually knows how to run  while part of it is in the
  525. HMA!  You have to load the HIMEM.SYS device driver which is an XMS manag-
  526. er and |nHMA|n manager, and then give the command |sDO|1S|s=|sHIG|1H|s in your CONFIG.SYS
  527. file, and magically the DOS kernel and the BUFFERS will load into the |nHMA|n
  528. instead of  into conventional memory!   This frees up  about 45K  of your
  529. precious conventional |nmemory|n,  or even 64K of it  if you were using a lot
  530. of BUFFERS.   Also the latest versions of Microsoft's MOUSE driver can go
  531. into the |nHMA|n.  But when one program is using the |nHMA|n nothing else can use
  532. it.   Even if there is room left up there.    Nothing can go there except
  533. things that the  controlling program  allows.   The DOS kernel allows the
  534. BUFFERS and the MOUSE driver,  but nothing else.   Any leftover |nHMA|n space
  535. just goes to waste.
  536.  
  537.  
  538.  
  539.  
  540.           <page down> for DOS 5.0 (and later) |nMemory|n Management
  541.                   DOS 5.0 (and later) |nMemory|n Management
  542.  
  543. If you don't have  a 286 or  higher computer  with some  extended memory,
  544. then don't even read this chapter.   It will only make you jealous of the
  545. people who do have the right hardware to be able to do this stuff.
  546.  
  547. The first thing  you want to do  is load the  HIMEM.SYS device driver via
  548. your CONFIG.SYS file,  by putting the line |sDEVIC|1E|s=C:\DOS\HIMEM.SYS at the
  549. beginning of that file.  HIMEM.SYS is an XMS manager and HMA (|sHig|1h|s Memory
  550. Area) enabler.  It gives you access to both of those types of memory.
  551.  
  552. Then add the line  |TDO|1S|T=HIGH anywhere in the CONFIG.SYS file,  and DOS 5.0
  553. will load its kernel and the BUFFERS into the HMA instead of leaving them
  554. to take up your precious conventional memory space.
  555.  
  556. Since the HIMEM.SYS device driver converts all of your extended memory to
  557. XMS memory  (which just means extended memory  that's being managed by an
  558. eXtended Memory Specification driver which is what HIMEM.SYS is),  if you
  559. have  any programs  that can use  extended memory  but can't use  the XMS
  560.              <page down> for more DO|1S 5.0 (and later) |nMemory|n
  561. method of accessing it, then you need to tell HIMEM.SYS to leave you some
  562. plain old  extended memory  instead of managing all of it  and turning it
  563. into XMS memory.  That's easy to do.   Just add the parameter /INT15=####
  564. to the end of your |sDEVIC|1E|s=HIMEM.SYS command.   The symbol #### stands for
  565. however many Kilo|sbytes|s  of extended memory  you want to keep  as extended
  566. instead of having it converted to XMS, plus 64K.  For example if you want
  567. to keep 256K  of extended memory,  then you would use  /INT15=320 because
  568. 256 + 64 = 320,  so that will leave you with 256K of extended memory, and
  569. the rest will still be converted to XMS memory and HMA and all that.
  570.  
  571. If you have a 286,  that's it,  you're done.   If you have a 386, there's
  572. lots more, so read on!
  573.  
  574. First,  change DOS=|sHIG|1H|s to  DOS=HIGH,UMB which tells DOS to use the Upper
  575. Memory Blocks that EMM386 is going to create.   And right after the HIMEM
  576. .SYS line, you want to install EMM386.  If you just want EMM386 to create
  577. some Upper memory blocks  in the empty reserved memory addresses  between
  578. 640K and 1024K, then use this line:
  579.           DEVICE=C:\DOS\EMM386.EXE NOEMS
  580.              <page down> for more DO|1S 5.0 (and later) |nMemory|n
  581. The NOEMS parameter tells EMM386 NOt to create any EMS (expanded) memory.
  582. So it will just remap some extended memory into those empty reserved add-
  583. resses, so that it becomes Upper memory.
  584.  
  585. If you want EMM386 to create Upper memory  and also emulate some expanded
  586. memory, then you use this line instead:
  587.           |sDEVIC|1E|s=C:\DOS\EMM386.EXE #### |nRAM|n
  588. The |nRAM|n parameter  tells EMM386 to create  Upper memory  and also emulate
  589. some expanded memory.   That means take some extended memory and convince
  590. the computer  that it's really expanded memory instead.   The #### symbol
  591. there is the spot where you tell it how much EMS to create.   The default
  592. is 256 so if you want  just 256K of  expanded memory,  then you can leave
  593. that out.   If you want, say,  a meg of EMS,  then put 1024 there where I
  594. put ####.   Now understand that emulating EMS means  you'll have 64K less
  595. Upper memory than you would have if you didn't.   Because expanded memory
  596. requires 64K of  empty address space with no memory in it,  to use as the
  597. page frame.   So those 64K of addresses  will not be available for EMM386
  598. to  create Upper memory in.   So don't use  the |nRAM|n parameter  unless you
  599. have an application that really does want some expanded memory.
  600.              <page down> for more DO|1S 5.0 (and later) |nMemory|n
  601. (If for  some reason  you want to have  emulated expanded memory  without
  602. creating any Upper memory,  then load EMM386 without  either of the NOEMS
  603. or |nRAM|n parameters.   And if for some reason you want to have Upper memory
  604. support without loading the DOS kernel hig|1h,  then use DOS=UMB instead of
  605. DOS=HIGH,UMB.)
  606.  
  607. All right,  now you've got Upper memory in what used to be empty reserved
  608. memory addresses.   And you've used DOS=UMB to tell DOS to be prepared to
  609. use that  Upper memory.   So what do you do with it?   You load your TSRs
  610. and |sdevice driver|ss into it!   So that they no longer take up any space in
  611. your conventional memory!  For your device drivers, you just use the com-
  612. mand |tDEVICEHIGH|t instead of the DEVIC|1E command you would normally use, and
  613. make sure it comes after the commands  that load HIMEM and EMM386 or else
  614. it won't work because there is not yet any Upper memory to |nDEVICEHIGH|n in-
  615. to.  For your TSRs, you insert the word |tLOADHIGH|t (or the abbreviation |tLH|t)
  616. at the front of the command that loads the TSR into memory.  For example,
  617. if you usually load a screen-saver  with the command EXPLOSIV M2 then you
  618. would change that to |nLOADHIGH|n EXPLOSIV M2 or |nLH|n EXPLOSIV M2 so the screen
  619. saver will go into Upper memory instead of conventional.
  620.              <page down> for more DO|1S 5.0 (and later) |nMemory|n
  621. If you run out of Upper memory  so that DOS can't load  the specified de-
  622. vice or TSR there,  it will still load it,  but into conventional memory,
  623. just as if you had used the DEVIC|1E command or left out the LH instead.
  624.  
  625. Now there are TSRs and |sdevice driver|ss that just won't run from Upper mem-
  626. ory at all.   No matter what.   And there are others that would run there
  627. if only you could  get them up there.   Some of them  give a MEM  command
  628. reading like as if they were small enough to fit into a free UMB, and yet
  629. they will load into conventional RAM instead of loading high, as if there
  630. was not enough memory free in the UMB.  A lot of times, all this means is
  631. that there's not enough memory up there for it to load,  not that there's
  632. not enough for it to run.  What?  Well you see, many drivers and TSRs re-
  633. quire a whole bunch of memory while they're loading,  but then as soon as
  634. they're loaded,  they settle down and only take up their normal amount of
  635. memory.   If you've got one of these,  all you have to do is put its com-
  636. mand earlier in the CONFIG.SYS or AUTOEXEC.BAT file, so that it loads be-
  637. fore something else,  so that at that time,  there is a larger  UMB open.
  638. Then it can load,  and it will settle down  to its normal small size,  so
  639. that there will  still be room  for the one that you put  the misbehaving
  640.              <page down> for more DO|1S 5.0 (and later) |nMemory|n
  641. one in front of.   So with DEVICEHIGH and LOADHIGH, loading order of |sTSR|ss
  642. and |sdevice driver|ss matters even more than it used to before DOS 5.0.
  643.  
  644. DOS 5.0's EMM386 device driver/command has a lot of switches and paramet-
  645. ers but you'll probably never need them, except the i switch.  The "i" is
  646. for "include" and it lets you include extra Upper memory addresses.   You
  647. see, DOS only remaps extended memory to certain Upper memory addresses it
  648. knows  are available on  just about every type  of computer.   Almost any
  649. computer has more available Upper memory addresses than those.  It's just
  650. that DOS doesn't bother to look and see what's available, unless you tell
  651. it.   So if you can decipher the output of the MEM /D command,  or if you
  652. have a program such as  Quarterdeck's Manifest or DOS 6.0's MSD which can
  653. tell you which addresses are not being used you can use EMM386's i switch
  654. to tell it to create  usable Upper memory blocks  in those addresses too!
  655. Then you can LOADHIGH  a whole bunch more  TSRs and device drivers!   For
  656. example, here's the command I use in my CONFIG.SYS file:
  657.           |sDEVIC|1E|s=C:\DOS\EMM386.EXE i=b000-b7ff i=c800-efff NOEMS
  658. Because Manifest tells me that the addresses  B000-B7FF and C800-EFFF are
  659. unused on my computer.  These addresses work for a lot of people.  But if
  660.              <page down> for more DO|1S 5.0 (and later) |nMemory|n
  661. you want to try those, you make real sure to have a good bootable DOS 5.0
  662. floppy disk handy before you add those i |sswitch|ses to your EMM386 command!
  663. Because if those memory addresses are not available on your computer then
  664. putting those  switches in there  could very well  lock up your computer.
  665. You won't be able to reboot either,  because every time you try, the com-
  666. puter will read  the same line in the same CONFIG.SYS file  and just lock
  667. up again!  You'll need to be able to boot from a floppy disk and edit the
  668. CONFIG.SYS file to remove those i switches again.   Of course if you have
  669. DOS 6.0,  you can always hit the <F8> key to  bypass the CONFIG.SYS file.
  670.  
  671. If your system does not have  an |nextended|n BIOS data area,  and you have a
  672. monochrome  or color  graphics adapter,  EMM386 can probably do  the same
  673. thing for you  as what Quarterdeck's VIDRAM  would--give you over 700K of
  674. conventional memory!   Use i=A000-B7FF for a color adapter or i=A000-AFFF
  675. for monochrome.  That will cause EMM386 to map memory into those address-
  676. es,  and since they're contiguous with the top of the conventional memory
  677. (if you don't have  an |nextended|n BIOS  data area,  that is),  they will be
  678. used as  conventional memory!   But of course  you can't run any programs
  679. that use any graphics.  And unlike VIDRAM, you have to reboot in order to
  680.              <page down> for more DO|1S 5.0 (and later) |nMemory|n
  681. do this or undo it.   But if you have a program that doesn't use graphics
  682. and needs more memory than you can give it, this is a good trick to know!
  683.  
  684. Now there's one problem with having all the free conventional memory that
  685. DOS 5.0 and 6.0  can give you!   There used to be  a very popular program
  686. for creating other programs, which had a bug in it.   Programs created by
  687. that program can't run in the bottom 64K of memory addresses.  That never
  688. used to matter, because the DOS kernel was always taking up those addres-
  689. ses so programs couldn't possibly attempt to run there anyway.   But with
  690. DOS 5.0 and later, you can have most of the bottom 64K of addresses free!
  691. Those old programs  won't run anymore  in that case!   Common results are
  692. the "|tPacked file corrupt|t" or "CRC error" messages, or just not running at
  693. all.   What should you do about it?   Either load a couple of |sTSR|ss low to
  694. fill up those lowest 64K of addresses, or else reboot the computer from a
  695. floppy disk that doesn't have  DOS=|sHIG|1H|s  in its CONFIG.SYS file.   Or use
  696. the new command created for just this purpose.  Its name is |tLOADFIX|t.
  697.  
  698. Say you have a program named HELLO.EXE which gives you that  "Packed file
  699. corrupt" message when you try to run it.   Well all you have to do is in-
  700.              <page down> for more DO|1S 5.0 (and later) |nMemory|n
  701. stead of typing HELLO to run that program, just type LOADFIX HELLO.  Then
  702. LOADFIX will load the  HELLO.EXE program into addresses  above the bottom
  703. 64K, and run it there.  Then it'll work just fine.
  704.  
  705. Now if you have a 386 computer,  with DOS 5.0,  you should be able to get
  706. about 616K  of free conventional memory.   The only things that should be
  707. loaded low are parts of MSDOS, HIMEM, EMM386, and COMMAN|1D.  Hopefully you
  708. will be able to get everything else into the Upper memory blocks.
  709.  
  710. If you have a TSR that allows you  to use commands to modify its behavior
  711. after it's loaded,  and you used LOADHIGH to load it, you may have to use
  712. LOADHIGH to get the modifying commands to work also!  For example, I have
  713. a screen-saver named EXPLOSIV and it allows commands such as EXPLOSIV OFF
  714. to temporarily disable it, EXPLOSIV ON to re-enable it, etc.  Well when I
  715. have it LOADHIGHed,  those commands don't work.   Because when I  use the
  716. OFF parameter to try to disable it, EXPLOSIV loads into conventional mem-
  717. ory and looks around  to find the copy of it that's already loaded to try
  718. to disable itself, and it finds that it's not already loaded,  so how can
  719. it disable itself?  It is already loaded, but it can't tell that, because
  720.              <page down> for more DO|1S 5.0 (and later) |nMemory|n
  721. it is only looking for itself in conventional, not Upper memory.   So the
  722. command LOADHIGH EXPLOSIV OFF works,  because with that command, EXPLOSIV
  723. loads into Upper memory to look for the already-loaded copy of itself and
  724. turn it off.   It works just fine that way.   It seems strange to use the
  725. LOADHIGH command to disable a TSR,  but in some cases  that's what has to
  726. be done.  So if you have a TSR that lets you disable it, or unload it, or
  727. modify it in some way,  and it doesn't work  when the TSR is  LOADHIGHed,
  728. try using the LOADHIGH command like that, and it just might work for you.
  729.  
  730. Be sure to use the versions of HIMEM.SYS,  EMM386.EXE,  RAMDRIVE.SYS, and
  731. SMARTDRV.SYS  that came with the most recent  Microsoft product you have.
  732. If you have Windows 3.0, use DOS 5.0's copy of those files.   If you have
  733. Windows 3.1, use its instead, unless you have DOS 6.0,  in which case you
  734. need to use those.  The directory name in your |sDEVIC|1E|s=C:\DIRNAME\WHATEVER
  735. command in the  CONFIG.SYS file determines  which version of those device
  736. drivers you're using (except for Windows 3.1's and DOS 6.0's SMARTDRV.EXE
  737. where that's determined by the directory name in your SMARTDR|1V command in
  738. the AUTOEXEC.BAT file).
  739.  
  740.              <page down> for more DO|1S 5.0 (and later) |nMemory|n
  741. Now,  what's new in DOS 6.0?   First, both HIMEM.SYS  and EMM386.EXE have
  742. been changed so that they  don't put so many messages on your screen dur-
  743. ing |sboot|sup.   You can add a /V (for Verbose)  switch to the end of either
  744. of those commands in your CONFIG.SYS file, to make them show their status
  745. messages like they did in DOS 5.0, if you want to.  Or if you want to see
  746. those messages just once,  hit your Alt key during bootup, and they'll be
  747. verbose for you just this time.
  748.  
  749. HIMEM.SYS might need  an /EISA switch in order to see  more than 16 mega-
  750. bytes of memory on a machine with an EISA bus.
  751.  
  752. |nEMM386|n.EXE now loads part of itself  into Upper memory instead of leaving
  753. such a large chunk in conventional memory.   If for some reason you don't
  754. want it to do that,  use the NOHI  switch on its  DEVIC|1E command  in your
  755. CONFIG.SYS file.
  756.  
  757. |nEMM386|n.EXE in DOS 6.0 has quite a few impressive new abilities,  at least
  758. in comparison to  DOS 5.0's version.   Now instead of forcing you to tell
  759. it exactly how much expanded memory you want it to emulate, and not being
  760.              <page down> for more DO|1S 5.0 (and later) |nMemory|n
  761. able to change that amount  without editing your CONFIG.SYS file  and re-
  762. |sboot|sing,  the new EMM386 will pretty much  give your applications however
  763. much expanded memory they want, whenever they ask for some!  Then when an
  764. application is done using the expanded memory, it turns back into extend-
  765. ed (well, XMS actually) memory again so that programs that want that kind
  766. of memory can still have some!
  767.  
  768. If you don't use  the NOEMS parameter  on the |sDEVIC|1E|s=EMM386.EXE  command,
  769. then you're going to get expanded memory.   How much?   Well if you don't
  770. tell it how much you want,  then you start out with 256K and applications
  771. can have as much as  the entire amount of your XMS memory if they ask for
  772. it.   If you want to limit it to two mega|sbytes|s though,  for example, then
  773. you add 2048 (because two megabytes is 2048 kilobytes)  to the end of the
  774. EMM386 command in CONFIG.SYS.  To change the original 256K amount you use
  775. the MIN= parameter.   For example,  MIN=0 means don't create any expanded
  776. memory at first.  MIN=1024 means start out with one meg.  Etc.
  777.  
  778. Let's say you have  8M of memory installed in your system,  and that your
  779. BIOS uses 384K for Shadow RAM.  Subtract your 640K of conventional memory
  780.              <page down> for more DO|1S 5.0 (and later) |nMemory|n
  781. and you're left with 7M of extended memory.  You use DOS=|sHIG|1H|s,UMB in your
  782. CONFIG.SYS so the DOS kernel  is using the 64K HMA.   Then EMM386 takes a
  783. bunch of XMS memory  for its own housekeeping and even more to remap into
  784. the reserved memory addresses to create Upper memory.  Now you have maybe
  785. 6816K of XMS memory left.  So let's say you used this CONFIG.SYS command:
  786.           DEVICE=C:\DOS\EMM386.EXE |nRAM|n 4096 MIN=512
  787. When |nEMM386|n.EXE loads,  right away it reserves 512K of XMS memory for use
  788. as expanded memory.   So now you have 6304K of XMS and 512K of EMS.  Next
  789. perhaps you run a program that needs one meg of expanded memory.  You on-
  790. ly have 512K, but that's all right.   DOS 6.0's EMM386 can create new ex-
  791. panded memory  automatically,  on the fly,  any time an application wants
  792. some--as long as you have that much available XMS memory!   So as soon as
  793. the program asks for  a meg of expanded memory,  EMM386 creates 512K more
  794. expanded memory.   Now you have 6252K of XMS available, and 1024K of EMS.
  795. When you exit  that program,  the extra 512K of expanded memory  that was
  796. created becomes XMS memory again,  since nothing is using it.   So again,
  797. you have 6304K of XMS and 512K of EMS.   Next let's say you run a program
  798. that wants  five megs of EMS memory.   No can do.  In your DEVIC|1E command
  799. you told EMM386 not to ever create more than a total of 4096K of expanded
  800.              <page down> for more DO|1S 5.0 (and later) |nMemory|n
  801. memory!  If you needed more than that, you'd have to edit your CONFIG.SYS
  802. file and reboot the computer.   If you want to allow all of your XMS mem-
  803. ory to be  converted to EMS,  then don't put  any number  in that command
  804. where 4096 is in the above example.  If you do use a number there, it can
  805. be anywhere from 64 to 32768, and it must be a multiple of 16 or DOS will
  806. just round it down to the nearest multiple of 16.   If you want to ensure
  807. that you will always have a certain amount of XMS memory that EMM386 will
  808. leave alone, you can use EMM386's l switch.  For example l=1024 will make
  809. EMM386 always ignore one megabyte of XMS memory.  Using l=1024 would have
  810. the same effect as using 5792 in place of 4096 in the above example.  Ei-
  811. ther way,  EMM386 could never give an application more than 5792K of EMS.
  812.  
  813. If your system stops responding  to the <Ctrl-Alt-Del> keystroke combina-
  814. tion after you start using DOS 6.0's EMM386, add the parameter ALTBOOT to
  815. the end of your EMM386 command in the CONFIG.SYS file.
  816.  
  817. If you don't want to be bothered  with learning how to load your |sTSR|ss and
  818. |sdevice driver|ss into Upper memory manually,  DOS 6.0 has the MEMMAKER com-
  819. mand just for you!
  820.                       <page down> for What Is a TSR?
  821.                               What Is a |tTSR|t?
  822.  
  823. |nTSR|n stands for Terminate-and-Stay-Resident.  Another name for |nTSR|n is Mem-
  824. ory-Resident-Program.   That means any program  that you load into memory
  825. once, and it stays there,  at your beck and call,  or just hanging around
  826. in the background  watching every move  you make,  until such time as you
  827. reboot the computer.
  828.  
  829. DOS itself can be thought of as a |nTSR|n,  except that TSRs  are usually op-
  830. tional,  and DOS is not.   If you don't have DOS  resident in memory then
  831. your computer  ain't going  nowhere!   Device drivers  are also TSRs in a
  832. way, but just a special type of |nTSR|n.
  833.  
  834. If you have a MOUSE or trackball,  and you load  its driver  via AUTOEXEC
  835. .BAT rather than CONFIG.SYS,  then it is not  a device driver exactly but
  836. it still is a |nTSR|n,  most definitely.   It hangs around  in the background
  837. watching you, and whenever you move your mouse it springs into action and
  838. moves the mouse pointer around on your screen.
  839.  
  840.                          <page down> for more TSR
  841. Automatic screen-savers  that blank your screen after a certain number of
  842. minutes of keyboard inactivity are TSRs.   Anything you can "hotkey" into
  843. with a little keystroke combination like <Ctrl-Esc> or <Alt-F1> is also a
  844. |nTSR|n.  There are lots of little phone book and appointment scheduler TSRs.
  845.  
  846. And here are some of the TSRs that come free with DOS:   APPEND,  DOSKEY,
  847. DOSSHELL, FASTOPEN, GRAPHICS, MIRROR, MODE, PRINT, and SHARE.  Except for
  848. DOSSHELL  and MIRROR,  once you execute those commands,  the |nTSR|n stays in
  849. memory until you reboot.   Some TSRs have commands  that remove them from
  850. memory, but not most of the ones that come with DOS!  Although there is a
  851. great public domain utility called MARK-and-RELEASE (and some others that
  852. work in the same manner)  that you can use to make it possible  to remove
  853. just about any |nTSR|n from memory without rebooting.
  854.  
  855. Of course it's not possible to remove one |nTSR|n if there has been any other
  856. |nTSR|n loaded into memory after it.  The only thing you can remove from mem-
  857. ory is the most recent thing you put into memory.  Strangely enough, this
  858. includes batch files.   If you issue a command  to remove a |nTSR|n from mem-
  859. ory from within a batch file, that |nTSR|n won't drop out of memory until the
  860.                          <page down> for more TSR
  861. batch file ends.  Because although a batch file isn't actually loaded in-
  862. to memory  while it is executed,  there is some  batch-file-handling data
  863. that does take up a speck of memory while the batch file is running.   So
  864. the batch file  that gives the command  to unload the |nTSR|n might cause the
  865. |nTSR|n to be disabled and not work anymore,  but the memory that the |nTSR|n was
  866. using won't be freed up for other uses until that batch file exits to the
  867. DOS prompt and the memory used by the batch-handling data is deallocated.
  868.  
  869. You mustn't ever try to load or unload a |nTSR|n from within another program,
  870. such as when you're Shelling Out  from your word processor  or something.
  871. You have to exit  to the primary command processor  before you can do any
  872. messing around with  memory allocations,  or you'll probably  lock up the
  873. whole computer and be forced to reboot,  losing whatever data you had en-
  874. tered into your application since the last time you saved it to disk.
  875.  
  876. TSRs eat memory.   They eat it for breakfast, lunch, and dinner.   If you
  877. have any "Out of memory" errors,  the first thing  you want to do is make
  878. sure you're not using  any TSRs or |sdevice driver|ss in  your CONFIG.SYS and
  879. AUTOEXEC.BAT files, except necessary ones.  (See also LOADHIGH.)  The DOS
  880.                          <page down> for more TSR
  881. version 4  installation program  puts a whole bunch  of worthless  things
  882. like APPEND, FASTOPEN, GRAPHICS, and PRINT into those files.   Get rid of
  883. them,  unless you have read  what they're about  and still think you need
  884. them.   (In fact,  if you have DOS 4,  check out  every command  in those
  885. files because  there are other  useless ones  like |sLASTDRIVE|s=E and VERIFY
  886. OFF  which are |sdefault|ss,  and  |sBREAK|s=ON  which slows  your computer down.
  887. These don't take up any memory, but they're still worthless and should be
  888. removed.  I have a feeling that whoever wrote the install program for DOS
  889. 4 hadn't read their DOS manual yet.)
  890.  
  891. If you have DOS version 4 or later,  you can use the MEM command  to find
  892. out  what TSRs you  have loaded.   Otherwise,  look and see what kinds of
  893. commands  you have in  your CONFIG.SYS  and AUTOEXEC.BAT files.   The DOS
  894. commands you can look up right here to see if they're TSRs,  and the non-
  895. DOS commands you will have to check the documentation that came with each
  896. program.   Now you know what TSRs get loaded from your AUTOEXEC.BAT file,
  897. and then there could also be  others that you've loaded  since your AUTO-
  898. EXEC.BAT file  was run at |sboot|sup.   For example,  let's say you don't use
  899. the PRINT command  in your  AUTOEXEC.BAT file  because you don't  need it
  900.                          <page down> for more TSR
  901. that often.   But the PRINT command  is still a |nTSR|n every time you do use
  902. it,  regardless of whether your AUTOEXEC.BAT or your fingers typed in the
  903. command.
  904.  
  905. Another thing that a lot of new computer users  don't realize is that the
  906. DOSSHELL  and most other menu programs  are TSRs.   There are  some menus
  907. that drop most of the way out of memory when you launch a program through
  908. them.  But most of them, including the DOSSHELL, stay right there in your
  909. memory,  in the way of your  programs that you're  trying to run.   Isn't
  910. that dumb?  You have to exit out of the DOSSHELL or menu program in order
  911. to have enough memory  to run a program,  so what good does it do to have
  912. the menu, right?  Just to remind you of what programs you could run?  You
  913. can get that from the DIR command!
  914.  
  915. Even worse than that,  many menu programs allow Shelling Out to DOS,  but
  916. they don't tell you that you're supposed to type EXIT to get back in.  So
  917. instead,  you type the command that starts the menu.   Know what you just
  918. did?   You just loaded  a second copy  of the menu program  on top of the
  919. first copy that was already there!  Now you're really wasting memory!  Be
  920.                          <page down> for more TSR
  921. careful with menu programs.  They can really cause all sorts of problems.
  922. But if you know what Shelling Out is about, you can avoid those problems.
  923.  
  924. There are lots  of occasions  when you need to  absolutely  and without a
  925. doubt boot up without any TSRs whatsoever.   For example, when you're in-
  926. stalling a new software package  you just bought,  or every time  you are
  927. about to run a disk optimizer  to take care of all your fragmented files.
  928. The easiest way to do that  is to reboot  from a boo|1t disk  that was for-
  929. matted with the /S switch, and that doesn't have any AUTOEXEC.BAT or CON-
  930. FIG.SYS files on it.  You can put those files on your boo|1t disk, but only
  931. if the CONFIG.SYS file  doesn't contain anything  except your hard disk's
  932. device driver  if your hard disk needs one,  and only if the AUTOEXEC.BAT
  933. file doesn't contain anything but PATH and PROMPT and C|1:.  Now you have a
  934. boo|1t disk  that is safe to use  whenever you're going to  |sdefrag|sment your
  935. hard drive or install some new software or BACKUP or RESTORE files or run
  936. a disk diagnostics program  like PCTools Diskfix  or even CHKDSK with the
  937. /F switch.  This is necessary because really bad things can happen if you
  938. have any TSRs in memory  while you perform  such operations.   Especially
  939. the disk optimizer.  It's going to move all your files to different parts
  940.                          <page down> for more TSR
  941. of the disk.   Well if there's anything in memory  like a disk cache,  or
  942. FASTOPEN,  or anything that keeps track of where the data is on the disk,
  943. well, when the optimizer moves everything around, then those TSRs are go-
  944. ing to have the wrong info,  and they are going to trash your entire FAT.
  945. Or if you have any |nTSR|n that gets activated at a certain time,  or after a
  946. certain delay,  and it comes to life just as the optimizer  is writing to
  947. the FAT,  whoa,  look out!   And then to really be on the safe side,  you
  948. should reboot the computer again the very second  the optimizer finishes!
  949. That will remove everything from memory and let the TSRs read the changed
  950. information from the disk again,  in case you had forgotten to remove any
  951. of them from memory beforehand.
  952.  
  953. If you have DOS version 6.0,  then you don't need a boo|1t disk in order to
  954. boot clean like that.   Just hit the <F5> key during bootup when DOS says
  955. "Starting MS-DOS...",  and it'll bypass  your CONFIG.SYS and AUTOEXEC.BAT
  956. files completely,  as if you were  booting from  a disk that  didn't have
  957. those files on it.
  958.  
  959. TSRs work by trapping a certain interrupt.   For example, a pop-up sched-
  960.                          <page down> for more TSR
  961. uler might sit there waiting for you to press the <Alt-S> keystroke.  Now
  962. if you have another |nTSR|n that grabs the interrupt for that keystroke also,
  963. or if the application you're working on uses that keystroke,  then you've
  964. got a |nTSR|n conflict.   There are a whole lot of ways that one |nTSR|n can con-
  965. flict with another, or with a program.  So whenever you start using a |nTSR|n
  966. that you've never used before,  watch out for problems, and if any occur,
  967. it's probably the fault of your new |nTSR|n.   There ain't no such thing as a
  968. free lunch, you know,  so along with the convenience of pop-up schedulers
  969. and other highly  useful TSRs,  you've got to  expect some  problems too.
  970. Most TSRs work just fine  all by themselves,  but when you go using  more
  971. than one at a time,  there could be trouble.   I've been lucky,  and only
  972. had problems with two or three TSRs in my life,  but I know people who've
  973. had major problems  with lots of them.   It just depends  on what sort of
  974. system you have,  what other TSRs you use, and what applications you run.
  975. It also depends a lot on what order you have the different TSRs installed
  976. in your AUTOEXEC.BAT file.   If TSR-A doesn't work right when it's loaded
  977. before TSR-B,  then |nswitch|n those AUTOEXEC.BAT lines around  to load TSR-A
  978. after TSR-B instead, and it might work just fine, believe it or not!
  979.  
  980.                          <page down> for more TSR
  981. Many TSRs (and a lot of games too)  take over the system clock a bit more
  982. selfishly  than they ought to,  and end up  ruining the time  and/or date
  983. that DOS thinks it is.   If you find  that you have  such a program,  you
  984. want to remember to reset the time  every now and then,  so that the time
  985. in your directory listings stays close to correct.  To keep yourself from
  986. forgetting to do that,  just run the program from a batch file which does
  987. the TIME command after exiting from that program.
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.  
  996.  
  997.  
  998. That's the end of this Demonstration version of "DOS, Simply Said, Simply
  999. Done, Simply Easy!"   See Instructions to find out  how to order the full
  1000.                                  version.
  1001. Sorry, but these subjects aren't defined in this Demonstration version of
  1002. "DOS, Simply Said, Simply Done, Simply Easy!"   Press <Ctrl-Enter> to re-
  1003. turn to where you were,  or see Instructions to find out how to order the
  1004.                               full version.
  1005.         |T286|T            |TCPU|T             |TGRAPHICS|T     |tpublic domain|t
  1006.         |T386|T            |TC|1:|T              |tinterrupt|t    |tRAMdisk|t
  1007.         |T8088|T           |tdefault|t         |tKeyboard|t     |tRAMDRIVE.SYS|t
  1008.         |TAPPEND|T         |tDEFRAG|t          |TLASTDRIVE|T    |tReboot|t
  1009.         |tAUTOEXEC.BAT|t   |tDevice Driver|t   |TMEMMAKER|T     |TRESTORE|T
  1010.         |TBACKUP|T         |TDEVIC|1E|T          |TMEM|T          |tShareware|t
  1011.         |tBatch|t          |tDirectory|t       |TMIRROR|T       |TSHARE|T
  1012.         |tBoot|t           |TDIR|T             |TMODE|T         |tShelling Out|t
  1013.         |tBoo|1t Disk|t      |TDOSKEY|T          |TMOUSE|T        |tSMARTDRV.SYS|t
  1014.         |TBREAK|T          |TDOSSHELL|T        |TMSD|T          |TSMARTDR|1V|T
  1015.         |TBUFFERS|T        |TEXIT|T            |toptimizer|t    |tspooler|t
  1016.         |tCache|t          |TFASTOPEN|T        |tParameters|t   |tswitch|t
  1017.         |TCHKDSK|T         |TFAT|T             |tPATH|t         |TTIME|T
  1018.         |TCOMMAN|1D|T        |tfloppy|t          |TPRINT|T        |tVDISK.SYS|t
  1019.         |tcommercial|t     |tfragmented|t      |tPROMPT|t       |TVERIFY|T
  1020.         |tCONFIG.SYS|t                                  |TWhat Is DOS?|T
  1021.